/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2011
 */

package com.nail.zhaogr.model;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.nail.zhaogr.model.*;
import com.nail.zhaogr.dao.*;
import com.nail.zhaogr.service.*;
import com.nail.zhaogr.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


@Entity
@Table(name = "parameters")
public class Parameters extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "Parameters";
	public static final String ALIAS_PARA_ID = "paraId";
	public static final String ALIAS_PARA_NAME = "paraName";
	public static final String ALIAS_PARA_CODE = "paraCode";
	public static final String ALIAS_PARA_VALUE = "paraValue";
	public static final String ALIAS_PARA_TYPE = "paraType";
	
	//date formats
	

	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * paraId       db_column: paraId 
     */ 	
	
	private java.lang.Long paraId;
    /**
     * paraName       db_column: paraName 
     */ 	
	@NotBlank @Length(max=500)
	private java.lang.String paraName;
    /**
     * paraCode       db_column: paraCode 
     */ 	
	@Length(max=500)
	private java.lang.String paraCode;
    /**
     * paraValue       db_column: paraValue 
     */ 	
	@NotBlank @Length(max=500)
	private java.lang.String paraValue;
    /**
     * paraType       db_column: paraType 
     */ 	
	
	private java.lang.Integer paraType;
	//columns END


	public Parameters(){
	}

	public Parameters(
		java.lang.Long paraId
	){
		this.paraId = paraId;
	}

	

	public void setParaId(java.lang.Long value) {
		this.paraId = value;
	}
	
	@Id @GeneratedValue(generator="custom-id")
	@GenericGenerator(name="custom-id", strategy = "increment")
	@Column(name = "paraId", unique = true, nullable = false, insertable = true, updatable = true, length = 19)
	public java.lang.Long getParaId() {
		return this.paraId;
	}
	
	@Column(name = "paraName", unique = false, nullable = false, insertable = true, updatable = true, length = 500)
	public java.lang.String getParaName() {
		return this.paraName;
	}
	
	public void setParaName(java.lang.String value) {
		this.paraName = value;
	}
	
	@Column(name = "paraCode", unique = false, nullable = true, insertable = true, updatable = true, length = 500)
	public java.lang.String getParaCode() {
		return this.paraCode;
	}
	
	public void setParaCode(java.lang.String value) {
		this.paraCode = value;
	}
	
	@Column(name = "paraValue", unique = false, nullable = false, insertable = true, updatable = true)
	public java.lang.String getParaValue() {
		return this.paraValue;
	}
	
	public void setParaValue(java.lang.String value) {
		this.paraValue = value;
	}
	
	@Column(name = "paraType", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getParaType() {
		return this.paraType;
	}
	
	public void setParaType(java.lang.Integer value) {
		this.paraType = value;
	}
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("ParaId",getParaId())
			.append("ParaName",getParaName())
			.append("ParaCode",getParaCode())
			.append("ParaValue",getParaValue())
			.append("ParaType",getParaType())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getParaId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Parameters == false) return false;
		if(this == obj) return true;
		Parameters other = (Parameters)obj;
		return new EqualsBuilder()
			.append(getParaId(),other.getParaId())
			.isEquals();
	}
}

